package com.xcjh.module_ad.activity

import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.xcjh.base_lib.Constants
import com.xcjh.base_lib.base.activity.BaseActivity
import com.xcjh.module_ad.databinding.AdActivityMainBinding

/**
 * 广告主页
 */
@Route(path = Constants.Router.Ad.A_Ad_MAIN)
class AdMainActivity : BaseActivity() {
    private lateinit var binding: AdActivityMainBinding
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = AdActivityMainBinding.inflate(layoutInflater)
        setContentView(binding.root)
        binding.btnLunch.setOnClickListener {
            //startNewActivity<AdmobActivity> {  }
        }
        binding.btnInterstitial.setOnClickListener {
           // startNewActivity<AdmobActivity> {  }
        }
        binding.btnRewardVideo.setOnClickListener {
           // startNewActivity<AdmobActivity> {  }
        }
        binding.btnNative.setOnClickListener {
           // startNewActivity<AdmobActivity> {  }
        }
        binding.btnAdmob.setOnClickListener {
            startMyActivity<AdmobActivity> {}
        }
    }
    override fun onBackPressed() {
        // Move the task containing the MainActivity to the back of the activity stack, instead of
        // destroying it. Therefore, MainActivity will be shown when the user switches back to the app.
        moveTaskToBack(true)
    }
}